package org.db2.project.airline.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.util.Date;


/**
 * The persistent class for the EMPLOYEE database table.
 */
@Entity
public class Employee implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @SequenceGenerator(name = "EMPLOYEE_ID_GENERATOR", sequenceName = "EMPLOYEE_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "EMPLOYEE_ID_GENERATOR")
    private long id;

    private String addres;

    private String emailadress;

    @Temporal(TemporalType.DATE)
    private Date employementDate;

    @Temporal(TemporalType.DATE)
    private Date employementendDate;

    private String name;

    private String telephone;

    //bi-directional many-to-one association to EmployeeType
    @ManyToOne
    @JoinColumn(name = "EMPLOYEETYPEID")
    private EmployeeType employeetype;

    public Employee() {
    }

    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getAddres() {
        return this.addres;
    }

    public void setAddres(String addres) {
        this.addres = addres;
    }

    public String getEmailadress() {
        return this.emailadress;
    }

    public void setEmailadress(String emailadress) {
        this.emailadress = emailadress;
    }

    public Date getEmployementDate() {
        return this.employementDate;
    }

    public void setEmployementDate(Date employementDate) {
        this.employementDate = employementDate;
    }

    public Date getEmployementendDate() {
        return this.employementendDate;
    }

    public void setEmployementendDate(Date employementendDate) {
        this.employementendDate = employementendDate;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return this.telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public EmployeeType getEmployeetype() {
        return this.employeetype;
    }

    public void setEmployeetype(EmployeeType employeetype) {
        this.employeetype = employeetype;
    }
}